<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var diannao = {
            name: '联想笔记本',
            color: 'red',
            xinhhao: 5009,
            fu: function() {
                console.log('可以打游戏听音乐');
            }
        }
        for (var key in diannao) {
            alert(key);
            alert(diannao[key]);
        }
    </script>
</head>

<body>

</body>

</html>